<?php

/*	Vulpes-backend - Web-based managegent for wireless internet providers.
	Copyright (C) 2007,2008 LinFox Serviços em Informática LTDA.

	This file is part of Vulpes-backend.

	Vulpes-backend is free software: you can redistribute it and/or modify
	it under the terms of the GNU General Public License as published by
	the Free Software Foundation, either version 3 of the License, or
	(at your option) any later version.

	Vulpes-backend is distributed in the hope that it will be useful,
	but WITHOUT ANY WARRANTY; without even the implied warranty of
	MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
	GNU General Public License for more details.

	You should have received a copy of the GNU General Public License
	along with this program.  If not, see <http://www.gnu.org/licenses/>.

 	Please note that any front-end (client application) that is distributed
	along with Vulpes-backend, such as the Vulpes frontend by LinFox,
	is subject to it's correspending licene. */

require_once 'controller.php';
require_once 'user_dao.php';

class user_ctl extends controller
{
	protected $mode = 'users';
	protected $model = 'user';
	protected $dao = 'user_dao';
	
	function __construct()
	{
		parent::__construct();
	}

	function update_password()
	{
		$user_dao = new user_dao();
		$user = $user_dao->fetch(get($user_dao->key));
		$user_dao->update_password($user,$this->get('password'));
		return $this->show();
	}
	
}

?>